home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / STANDALO / PIXELFLI / SOURCE_ / NEW_CDEV / CDEV.H < prev    next >
Text File  |  1990-11-09  |  1KB  |  50 lines

  1.  
  2. /*
  3.  *  cdev.h - standard cdev object
  4.  *
  5.  *  Copyright (c) 1989 Symantec Corporation.  All rights reserved.
  6.  *
  7.  */
  8.  
  9. #define _H_cdev
  10.  
  11. #include "oops.h"
  12.  
  13. struct cdev : indirect {
  14.  
  15.         /*  instance variables  */
  16.         
  17.     WindowPeek        dp;                /*  the Control Panel  */
  18.     int                refnum;            /*  refnum of Control Panel DA  */
  19.     int                rsrcID;            /*  base resource ID  */
  20.     int                lastItem;        /*  # of last Control Panel item  */
  21.     EventRecord        *event;            /*  ==> last event  */
  22.     long            status;            /*  value to be returned  */
  23.     
  24.         /*  methods  */
  25.         
  26.     long            Message(int, int);    /*  dispatch message  */
  27.     void            Error(long);        /*  set error return  */
  28.     void            Init(void);            /*  "initDev"  */
  29.     void            Close(void);        /*  "closeDev"  */
  30.     void            Activate(void);        /*  "activDev"  */
  31.     void            Update(void);        /*  "updateDev"  */
  32.     void            Idle(void);            /*  "nulDev"  */
  33.     void            ItemHit(int);        /*  "hitDev"  */
  34.     void            Key(int);            /*  "keyEvtDev"  */
  35.     void            CmdKey(int);        /*  "keyEvtDev" (command)  */
  36.     void            Deactivate(void);    /*  "deactiveDev"  */
  37.     void            Undo(void);            /*  "undoDev"  */
  38.     void            Cut(void);            /*  "cutDev"  */
  39.     void            Copy(void);            /*  "copyDev"  */
  40.     void            Paste(void);        /*  "pasteDev"  */
  41.     void            Clear(void);        /*  "clearDev"  */
  42.     void            DoCursor(void);        /*  "cursorDev"  */
  43. };
  44.  
  45.  
  46. /*  each cdev must implement these  */
  47.  
  48. Boolean Runnable(void);            /*  "macDev"  */
  49. cdev *New(void);                /*  new(cdev)  */
  50.